When a game process is executed by a plurality of apparatuses communicating with each other, a delay in the communication has traditionally been taken into consideration during the execution of the game process.
When one (first) information processing apparatus receives information from another (second) information processing apparatus to execute a game process, it is traditionally difficult to synchronize a result of the game process in some cases. For example, there may be a difference in a timing at which a result occurs (e.g., a timing at which an attack hits when a first character controlled in the second apparatus attacks a second character controlled by the first apparatus) between the apparatuses, or there may be a difference in a result itself (e.g., whether or not an attack has successfully hit) between the apparatuses.
With this in mind, the present application discloses an information processing system, an information processing apparatus, a storage medium storing an information processing program, and a game processing method that allow facilitation of synchronization of a result of a game result between information processing apparatuses.
(1) A non-limiting example of an information processing system described herein includes a first information processing apparatus, and a second information processing apparatus configured to communicate with the first information processing apparatus.
The first information processing apparatus has a first control means and a first sending means. The first control means controls a first object in a virtual space according to an input by a user of the first information processing apparatus. The first sending means sends object information about the first object to the second information processing apparatus.
The second information processing apparatus has a first reception means, a prediction means, a processing means, and a second sending means. The first reception means receives the object information from the first information processing apparatus. The prediction means calculates a predicted position that is taken later than a current position of the first object in the first information processing apparatus, based on the received object information, and a delay time in communication between the first information processing apparatus and the second information processing apparatus. The processing means executes a game process based on the predicted position. The second sending means sends result information indicating a result of the game process to the first information processing apparatus.
According to the feature (1), in the second information processing apparatus, the predicted position is calculated, and therefore, a result of the game process can be obtained earlier than in the first information processing apparatus. As a result, an influence caused by a delay that occurs when the result information is sent from the second information processing apparatus to the first information processing apparatus can be reduced, and therefore, the synchronization of a result of the game process between the information processing apparatuses can be facilitated.
(2) The prediction means may repeatedly execute a predicted position calculation process of calculating the predicted position. In the predicted position calculation process, the prediction means may calculate a position that is taken a predetermined time based on the delay time later, and calculate a new predicted position based on the calculated position and a previous predicted position.
According to the feature (2), the second information processing apparatus can accurately calculate the predicted position based on the delay time.
(3) The prediction means may repeatedly execute a predicted position calculation process of calculating the predicted position. The prediction means, when newly receiving the object information, may calculate a new predicted position based on a difference between a position specified by the received object information and a position that is predicted a predetermined time based on the delay time earlier.
According to the feature (3), the second information processing apparatus can calculate the predicted position, taking into consideration the difference between the predicted position calculated in the second information processing apparatus, and an actual position in the first information processing apparatus, and therefore, can more correctly calculate the predicted position.
(4) The prediction means may repeatedly execute a predicted position calculation process of calculating the predicted position. The prediction means may obtain a new predicted position by correcting a predicted position calculated based on a first value based on the delay time, based on a second value based on the delay time, and a position specified by the received object information.
According to the feature (4), the predicted position can be calculated, taking the delay time into consideration, and in addition, the predicted position is corrected based on the received object information and the second value, and therefore, the predicted position can be more correctly calculated.
(5) The prediction means may repeatedly execute a predicted position calculation process of calculating the predicted position. In the predicted position calculation process, the prediction means may calculate a new predicted position by calculating a movement amount based on the delay time, and moving a previous predicted position based on the calculated movement amount. The prediction means may calculate a new predicted position using a movement amount obtained by combining a movement amount in a previous predicted position calculation process, and a movement amount calculated in a current predicted position calculation process, at a predetermined ratio.
According to the feature (5), a sharp change in the predicted position repeatedly calculated by the predicted position calculation process can be prevented or reduced. As a result, the possibility that a result (e.g., an action of an object) of the game process changes sharply can be reduced. Therefore, the possibility that a user feels unnaturalness with respect to a process result can be reduced.
(6) The first control means may cause the first object to perform a first action according to the input. The second information processing apparatus may further have a second control means. The second control means may control an action of the first object in the second information processing apparatus based on the predicted position so that a time it takes to complete the first action in the second information processing apparatus is shorter than a time it takes to complete the first action in the first information processing apparatus.
According to the feature (6), an influence of a delay occurring when the result information is sent from the second information processing apparatus to the first information processing apparatus can be reduced, and therefore, the synchronization of a result of the game process between the information processing apparatuses can be facilitated.
(7) The second control means may cause the first object to perform the first action while skipping a portion of the first action.
According to the feature (7), a period of time during which the first action is performed in the second information processing apparatus is easily reduced. As a result, an influence caused by the delay is easily reduced. Therefore, the synchronization of a result of the game process between the information processing apparatuses can be facilitated.
(8) The first control means may cause the first object to perform a second action according to the input. When a result occurs due to the second action of the first object in the second information processing apparatus, the second sending means may send the result information to the first information processing apparatus. The first information processing apparatus may have a second reception means and a result display means. The second reception means may receive the result information from the second information processing apparatus. The result display means may display an image representing a result of the game process based on the received result information.
According to the feature (8), the first information processing apparatus displays a result of the game process based on the result information received from the second information processing apparatus. Therefore, the first information processing apparatus and the second information processing apparatus can have the same process result.
(9) The second control means may further control a second object in the virtual space according to an input by a user of the second information processing apparatus. The processing means may execute, as the game process, a process of determining whether or not the second object has been affected by the second action of the first object. The second sending means may send information indicating whether or not the second object has been affected by the second action of the first object, as the result information, to the first information processing apparatus.
According to the feature (9), the first information processing apparatus and the second information processing apparatus can have the same result of the determination of whether or not the second object has been affected by the second action of the first object.
(10) The first sending means may send the object information containing information indicating the input by the user of the first information processing apparatus, to the second information apparatus.
According to the feature (10), the second information processing apparatus can more accurately calculate the predicted position based on the input to the first information processing apparatus.
Note that a non-limiting example of the first and second information processing apparatuses having the features (1)-(10) is herein disclosed. In addition, disclosed herein is a non-limiting example storage medium storing an information processing program that causes a computer of the second information processing apparatus (or the first information processing apparatus) to function as each means that is included in the second information processing apparatus (or the first information processing apparatus) having the features (1)-(10). In addition, disclosed herein is a non-limiting example game processing method executable in the information processing system having the features (1)-(10).
According to the information processing system, the information processing apparatus, the storage medium storing the information processing program, and the game processing method, the synchronization of a result of a game process between information processing apparatuses can be facilitated.
These and other objects, features, aspects and advantages of the present exemplary embodiment will become more apparent from the following detailed description of the present exemplary embodiment when taken in conjunction with the accompanying drawings.